<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title>新PMS项目</title>
	<script type="text/javascript" src="bootstrap/jquery.js"></script>
	<link rel="stylesheet" type="text/css" href="bootstrap/bootstrap.min.css" />
	<style type="text/css">
		body{
			background-image:url("bootstrap/backgroundimg.png");
		}
		
		}
		.div1{
			width:600px;
			height:auto;
			margin-top:80px;
			margin-left:200px;
			
		}
		hr{
			width:600px;
			border:1px solid black;
		}
		.help-block,#error{
			color:red;
		}
	</style>
</head>
<body>
	<div class="navbar navbar-fixed-top">
		<p class="p1">哈哈笑项目管理系统</p>
	</div>
	<div class="div1">
		<h1>项目列表</h1>
		<hr />
		<form class="form-horizontal" action="newProject.jspx" method="post"><!--提交表单，缺路径-->
		  <fieldset>
			<div class="control-group">
			  <label class="control-label" for="input01">项目名称</label>
			   <div class="controls">
				<input type="text" class="input-xlarge" id="input01" name="pname"><!--项目名称-->
				<p class="help-block">项目名称不能为空</p>
			  </div>
			  <label class="control-label">项目描述</label>
			  <div class="controls">
				<textarea name="pdsp" id="textarea01" cols="120" rows="5"></textarea><!--项目描述-->
				<p class="help-block">字数在60-150之间</p>
			  </div>
			  <label class="control-label">负&nbsp;&nbsp;责&nbsp;人</label>
			  <div class="controls">
				<select name="pname" id="select1"><!--提交值得名称-->
				<!--循环，这个具体商量一下，我不太确定是那些人-->
					<option value="jerry">jerry</option><!--具体商量-->
					<option value="sandy">sandy</option>
					<option value="marry">marry</option>
				</select>
				<p class="help-block">一个项目只有一个负责人</p>
			  </div>
			  <label class="control-label" for="input04">项目成员</label>
			  <div class="controls">
				<input type="text" class="input-xlarge" id="input04" name="pnames"><!--项目成员,存入数据库前要进行拆分单个的名字进行存入-->
				<p class="help-block">成员可以有多个</p>
			  </div>
			  <hr/>
			  <div class="controls">
				<span id="error"></span><br/>
				<input type="button" class="btn btn-primary" id="btn" value="提交">
				<input type="reset" class="btn btn-danger" value="重置">
			  </div>
			</div>
		  </fieldset>
	</form>
	</div>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#btn").click(function(){
				var input01 = $("#input01").val();
				var textarea01 = $("#textarea01").val();
				var input04 = $("input04").val();
				if(input01 == null || input01 == ""){
					$("#error").html("项目名称不对");
				}else if(textarea01.length<60||textarea01.length>150){
					$("#error").html("项目描述字数不对");
				}else if(input04 == null || input04 == ""){
					$("#error").html("成员不能为0");
				}else{
					$("form-horizontal").submit();
				}
			});
		});
	</script>
</body>
</html>